﻿using System.Data;
using System;
using NHibernate;

namespace DataLayer.UoW
{
    public interface IUnitOfWork : IDisposable
    {
        IGenericTransaction BeginTransaction();
        IGenericTransaction BeginTransaction(IsolationLevel isolationLevel);
        void TransactionalFlush();
        void TransactionalFlush(IsolationLevel isolationLevel);

        bool IsInActiveTransaction { get; }
        IUnitOfWorkFactory Factory { get; }
        ISession Session { get; }
        void Flush();
    }
}
